#!/bin/bash
clear

TEXT='\033[30;107;2m'
INFO='\033[97;44m'
WARNING='\033[97;43m'
ERROR='\033[97;41m'
SUCCESS='\033[97;42m'
GREEN='\033[92m'
YELLOW='\033[93m'
RESET='\033[0m'

if [ "${EUID}" -ne 0 ]; then
    echo -e "${ERROR} ERROR ${RESET}${TEXT} You need to run this script as root! ${RESET}"; exit 1
fi

read -p "Enter username" _namapengguna
systemctl enable shadowsocks-libev-server@$_namapengguna-tls.service &>/dev/null
systemctl start shadowsocks-libev-server@$_namapengguna-tls.service &>/dev/null
systemctl enable shadowsocks-libev-server@$_namapengguna-http.service &>/dev/null
systemctl start shadowsocks-libev-server@$_namapengguna-http.service &>/dev/null

clear
echo
echo -e "${TEXT} ========================================================== ${RESET}"
echo -e "${TEXT} SS-LIBEV - ENABLE ACCOUNT                                  ${RESET}"
echo -e "${TEXT} ---------------------------------------------------------- ${RESET}"
echo
echo -e "${SUCCESS} INFO ${RESET}${TEXT} Successfully enable user account ${RESET}"
echo
echo -e "${TEXT} ---------------------------------------------------------- ${RESET}"
echo -e "${TEXT} Created by Doctype, Powered by Cybertize.                  ${RESET}"
echo -e "${TEXT} Copyright 2021, Allright Reserved.                         ${RESET}"
echo -e "${TEXT} ========================================================== ${RESET}"
echo
